<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <jsp:include page="common/header.jsp"/>
    <link rel="stylesheet" type="text/css" href="/static/css/login.css">
    <title>Title</title>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <!-- 导航栏 -->
    <div class="layui-header">
        <a href="#" class="layui-logo">
            <span class="layui-logo-mini">FangCMS</span>
            <span class="layui-logo-lg">FangCMS 后台</span>
        </a>
        <a class="side-toggle layui-layout-left" href="#">
            <i class="layui-icon layui-icon-shrink-right"></i>
            <i class="layui-icon layui-icon-spread-left"></i>
        </a>
        <ul class="layui-nav layui-layout-right">
            <!--<li class="layui-nav-item timo-search">
              <input class="timo-search-input" type="search" placeholder="搜索">
              <button class="timo-search-button"><i class="fa fa-search"></i></button>
            </li>-->
            <li class="layui-nav-item">
                <a href="#">
                    <i class="fa fa-bell-o fa-lg"></i>
                </a>
            </li>
            <li class="layui-nav-item">
                <a class="timo-screen-full" href="#">
                    <i class="fa layui-icon layui-icon-screen-full"></i>
                </a>
            </li>
            <li class="layui-nav-item timo-nav-user">
                <a class="timo-header-nickname">${user.nickname}</a>
                <div class="layui-nav-child">
                    <div class="timo-nav-child-box">
                        <div><a class="open-popup" data-title="个人信息" data-url="/userInfo"
                                data-size="680,464"><!--
              --><i class="fa fa-user-o"></i>个人信息</a></div>
                        <div><a class="open-popup" data-title="修改密码" data-url="/editPwd"
                                data-size="456,296"><!--
              --><i class="fa fa-lock" style="font-size:17px;width:12px;"></i>修改密码</a></div>
                        <div><a href="/logout"><i class="fa fa-power-off"></i>退出登录</a></div>
                    </div>
                </div>
            </li>
        </ul>
    </div>

    <!-- 侧边栏 -->
    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <div class="layui-side-user">
                <img class="layui-side-user-avatar open-popup" data-url="/userInfo" data-size="680,464"
                     src="/system/user/picture?p=${user.picture}" alt="头像">
                <div>
                    <p class="layui-side-user-name" text="">${user.nickname}</p>
                    <p class="layui-side-user-designation">在线</p>
                </div>
            </div>
            <!-- 导航区域 -->
            <ul class="layui-nav layui-nav-tree" lay-filter="layui-nav-side">
                <c:forEach items="${treeMenu}" var="item">
                    <li class="layui-nav-item">
                        <a href="javascript:;" lay-url="${item.value.url}"><i class="${item.value.icon}"></i><span class="layui-nav-title">${item.value.title}</span></a>
                        <c:if test="${fn:length(item.value.children) >0  }">
                            <dl class="layui-nav-child">
                                <c:forEach var="sItem" items="${item.value.children}">
                                    <dd>
                                        <a href="javascript:;" lay-url="${sItem.value.url}"><span class="layui-nav-title">${sItem.value.title}</span></a>
                                        <c:if test="${fn:length(sItem.value.children) >0  }">
                                            <dl class="layui-nav-child">
                                                <c:forEach items="${sItem.value.children}" var="tItem">
                                                    <dd>
                                                        <a href="javascript:;" lay-url="${tItem.value.url}"><span class="layui-nav-title">${tItem.value.title}</span></a>
                                                    </dd>
                                                </c:forEach>
                                            </dl>
                                        </c:if>
                                    </dd>
                                </c:forEach>
                            </dl>
                        </c:if>
                    </li>
                </c:forEach>
            </ul>
        </div>
    </div>
    <!-- 主体区域 -->
    <div class="layui-body layui-tab layui-tab-brief" lay-allowclose="true" lay-filter="iframe-tabs">
        <!-- 标签栏 -->
        <ul class="layui-tab-title"></ul>
        <!-- 内容区域 -->
        <div class="layui-tab-content"></div>
    </div>
</div>
<jsp:include page="common/script.jsp"/>
<script src="/static/js/login.js" charset="utf-8"></script>
</body>
